package lab02.test20;

import java.util.Scanner;

public class Test20 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入字符：");
        String str = sc.nextLine();
        char[] arr = str.toCharArray();

        for (int i = 0; i < str.length(); i++)
        {
            if (arr[i] >= '0' && arr[i] <= '9') {
                System.out.print(arr[i]);

            }
        }
    }
}

